<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <meta http-equiv="refresh" content="10">
    <link th:rel="stylesheet" th:href="@{/webjars/bootstrap/4.6.0-1/css/bootstrap.min.css} "/>
    <title>SMW</title>
</head>

<body>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark static-top">
    <div class="container">
        <a class="navbar-brand" href="/">Stock Market Watcher</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive"
                aria-controls="navbarResponsive"
                aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarResponsive">
            <ul class="navbar-nav ml-auto">
                <li class="nav-item active">
                    <a class="nav-link" href="#">Home
                        <span class="sr-only">(current)</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/subscriptions">Subscription</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">Contact</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#" th:text="'Logged in as ' + ${email}"></a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" th:href="@{/logout}">Logout</a>
                </li>
            </ul>
        </div>
    </div>
</nav>
<div class="container">
    <div class="row">
        <div class="col-lg-10 mt-5 mb-5">
            <table class="table table-bordered">
                <thead>
                <tr>
                    <th>股票代码</th>
                    <th>实时价格</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="stockPrice: ${stockPrices}">
                    <td th:text="${stockPrice.key}">Symbol</td>
                    <td th:text="${stockPrice.value}">Price</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>

</body>
</html>